home *** CD-ROM | disk | FTP | other *** search
- /* Backup multiple volumes to tape */
-
- /* This macro assumes that the Backup Options */
- /* DisplayOptionsOn/Off flag is ON if the */
- /* user wants the Backup Options to appear */
- /* before the backup begins, and is OFF if */
- /* user does not want the Backup Options to */
- /* appear before the backup begins. When OFF */
- /* the options in Backup Options must be set */
- /* the way the user wants these backups to */
- /* occur. */
-
- Options Results
-
- /* Get the volumes */
-
- numVols = 0
- RC = 0
- Do While RC = 0
- RequestText "Please enter the disk or"||"0A"x||"drawer name to backup:"
- If RC = 0 Then Do
- volumes.numVols = result
- If Length(volumes.numVols) > 0 Then Do
- If Index(volumes.numVols,":") = 0 Then
- volumes.numVols = volumes.numVols||":"
- If Exists(volumes.numVols) Then
- numVols = numVols + 1
- Else
- Request1 "The disk or drawer '"||volumes.numVols||"'"||"0A"x||"does not exist."
- End
- End
- Request3 "Do you wish to backup another"||"0A"x||"disk or drawer?"
- End
-
- If numVols = 0 | RC ~= 2 Then Exit
-
- /* Ask if user wants to add session comments */
-
- Request3 "Do you wish to add comments"||"0A"x||"to each backup session?"
- If RC = 1 Then Exit
- comments = RC
-
- /* Backup the volumes */
-
- SetBackupOptions Complete DisplayOptionsOff
-
- BackupOptions
- If RC ~= 0 Then Exit
-
- SetTapeOptions AutoRewindOff
-
- Do i = 0 to numVols-1
- If comments = 0 Then SetSessionInfo
- Backup volumes.i
- If RC ~= 0 Then Do
- Request2 "An error has occurred."||"0A"x||"OK to continue with backup?"
- If RC ~= 0 Then
- Leave
- Else
- Iterate
- End
- End
-
- Exit
-